package com.kongjs.application.convert;

import com.kongjs.application.model.dto.*;
import com.kongjs.application.model.entity.Permissions;
import com.kongjs.application.model.vo.QueryPermissionParamVO;
import com.kongjs.application.model.vo.QueryPermissionVO;
import com.kongjs.application.model.vo.SavePermissionVO;
import com.kongjs.application.model.vo.UpdatePermissionVO;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;

import java.util.List;

@Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE,unmappedSourcePolicy = ReportingPolicy.IGNORE)
public interface PermissionsConverter {

    SavePermissionDTO toDto(SavePermissionVO vo);
    UpdatePermissionDTO toDto(UpdatePermissionVO vo);

    QueryPermissionVO toVo(QueryPermissionDTO dto);

    List<QueryPermissionVO> toVos(List<QueryPermissionDTO> items);

    Permissions toEntity(SavePermissionDTO dto);
    Permissions toEntity(UpdatePermissionDTO dto);

    QueryPermissionDTO toDto(Permissions permissions);

    List<QueryPermissionDTO> toDtos(List<Permissions> permissions);

    QueryPermissionParamDTO toDto(QueryPermissionParamVO paramVO);

    PermissionCacheDTO toCache(Permissions permissions);
}
